<?php
 
	class LikeView{
		
		private $LikeButtonURL = "liked";
		
		/**
		 * @return string XHTML string
		 */
		public function CreateLikeButton($likes){
			if ($likes == 0) {
				return "<a href='?$this->LikeButtonURL=true' title='Like this link!'>Like!</a> Noone likes this link";
			} 
			return "<a href='?$this->LikeButtonURL=true' title='Like this link!'>Like!</a> $likes like this link";		
			
			
		}
		
		/*
		 * @return boolean if user pressed button
		 */
		public function DidUserPressLike(){
			if ( isset($_GET[$this->LikeButtonURL]) == TRUE) {
				return TRUE;		
			}
			return FALSE;
		}
	}
